home *** CD-ROM | disk | FTP | other *** search
/ Aminet 1 (Walnut Creek) / Aminet - June 1993 [Walnut Creek].iso / aminet / util / gnu / textutl3.lha / textutils-1.3 / Makefile.in < prev    next >
Makefile  |  1992-06-29  |  4KB  |  132 lines

  1. # Master Makefile for the GNU text utilities.
  2. # Copyright (C) 1991 Free Software Foundation, Inc.
  3.  
  4. # This program is free software; you can redistribute it and/or modify
  5. # it under the terms of the GNU General Public License as published by
  6. # the Free Software Foundation; either version 2, or (at your option)
  7. # any later version.
  8.  
  9. # This program is distributed in the hope that it will be useful,
  10. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  12. # GNU General Public License for more details.
  13.  
  14. # You should have received a copy of the GNU General Public License
  15. # along with this program; if not, write to the Free Software
  16. # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  17.  
  18. SHELL = /bin/sh
  19.  
  20. #### Start of system configuration section. ####
  21.  
  22. srcdir = @srcdir@
  23. @VPATH@
  24.  
  25. # If you use gcc, you should either run the fixincludes script that
  26. # comes with it or else use gcc with the -traditional option.  Otherwise
  27. # ioctl calls will be compiled incorrectly on some systems.
  28. CC = @CC@
  29. AR = ar
  30. # Set RANLIB = echo if your system doesn't have or need ranlib.
  31. RANLIB = @RANLIB@
  32. # Use cp if you don't have install.
  33. INSTALL = @INSTALL@
  34. INSTALLDATA = @INSTALLDATA@
  35.  
  36. # Things you might add to DEFS:
  37. # -DSTDC_HEADERS    If you have ANSI C headers and libraries.
  38. # -DHAVE_UNISTD_H    If you have unistd.h.
  39. # -DUSG            If you have System V/ANSI C string and
  40. #            memory functions and headers.
  41. # -DST_BLKSIZE_MISSING    If your `struct stat' lacks st_blksize.
  42. # -DSIGTYPE=int        If your signal handlers return int, not void.
  43. # -DCHAR_UNSIGNED    If type `char' is unsigned.
  44. # -DSTRERROR_MISSING    If you lack strerror function.
  45. # -DVPRINTF_MISSING    If you lack vprintf function (but have _doprnt).
  46. # -DDOPRNT_MISSING    If you lack _doprnt function.  Also need to define
  47. #            -DVPRINTF_MISSING.
  48.  
  49. DEFS = @DEFS@
  50.  
  51. CDEBUG = -g
  52. CFLAGS = $(CDEBUG) -I. -I../lib -I$(srcdir)/lib $(DEFS)
  53. LDFLAGS = -g
  54. LIBS = @LIBS@
  55.  
  56. prefix = /usr/local
  57. # Prefix for each installed program, normally empty or `g'.
  58. binprefix = 
  59. # Prefix for each installed man page, normally empty or `g'.
  60. manprefix = 
  61.  
  62. # Where to install the executables.
  63. bindir = $(prefix)/bin
  64.  
  65. # Where to install the manual pages.
  66. mandir = $(prefix)/man/man1
  67. # Extension (not including `.') for the installed manual page filenames.
  68. manext = 1
  69.  
  70. #### End of system configuration section. ####
  71.  
  72. MDEFINES = bindir='$(bindir)' mandir='$(mandir)' \
  73. manext='$(manext)' binprefix='$(binprefix)' manprefix='$(manprefix)' \
  74. LIBS='$(LIBS)' LIBPROGS='$(LIBPROGS)' \
  75. AR='$(AR)' RANLIB='$(RANLIB)' INSTALL='$(INSTALL)' \
  76. INSTALLDATA='$(INSTALLDATA)' \
  77. CFLAGS='$(CFLAGS)' LDFLAGS='$(LDFLAGS)' LIBS='$(LIBS)' CC='$(CC)'
  78.  
  79. DISTFILES = COPYING ChangeLog Makefile.in README configure configure.in
  80.  
  81. # Redundant stuff for making only selected programs.
  82. PROGS = cat cmp comm csplit cut expand fold head join nl \
  83. paste pr sort split sum tac tail tr unexpand uniq wc
  84.  
  85. # Subdirectories to run make in for the primary targets.
  86. SUBDIRS = lib src man
  87.  
  88. all:
  89.     for dir in $(SUBDIRS); do echo making $@ in $$dir; cd $$dir; $(MAKE) $(MDEFINES) $@; cd ..; done
  90. .PHONY: all
  91.  
  92. $(PROGS): lib/libtu.a
  93.     cd src; $(MAKE) $(MDEFINES) $@
  94.  
  95. lib/libtu.a:
  96.     cd lib; $(MAKE) $(MDEFINES) all
  97.  
  98. install:
  99.     for dir in $(SUBDIRS); do echo making $@ in $$dir; cd $$dir; $(MAKE) $(MDEFINES) $@; cd ..; done
  100. .PHONY: install
  101.  
  102. tags:
  103.     for dir in $(SUBDIRS); do echo making $@ in $$dir; cd $$dir; $(MAKE) $(MDEFINES) $@; cd ..; done
  104. .PHONY: tags
  105.  
  106. TAGS:
  107.     for dir in $(SUBDIRS); do echo making $@ in $$dir; cd $$dir; $(MAKE) $(MDEFINES) $@; cd ..; done
  108. .PHONY: TAGS
  109.  
  110. mostlyclean:
  111.     for dir in $(SUBDIRS); do echo making $@ in $$dir; cd $$dir; $(MAKE) $(MDEFINES) $@; cd ..; done
  112. .PHONY: mostlyclean
  113.  
  114. clean:
  115.     for dir in $(SUBDIRS); do echo making $@ in $$dir; cd $$dir; $(MAKE) $(MDEFINES) $@; cd ..; done
  116.     rm -f Makefile config.status
  117. .PHONY: clean
  118.  
  119. realclean:
  120.     for dir in $(SUBDIRS); do echo making $@ in $$dir; cd $$dir; $(MAKE) $(MDEFINES) $@; cd ..; done
  121.     rm -f Makefile config.status
  122. .PHONY: realclean
  123.  
  124. dist:
  125.     echo textutils-`sed -e '/version_string/!d' -e 's/[^0-9.]*\([0-9.]*\).*/\1/' -e q < src/version.c` > .fname
  126.     rm -rf `cat .fname`
  127.     mkdir `cat .fname`
  128.     ln $(DISTFILES) `cat .fname`
  129.     for dir in $(SUBDIRS); do mkdir `cat .fname`/$$dir; cd $$dir; $(MAKE) $@; cd ..; done
  130.     tar chZf `cat .fname`.tar.Z `cat .fname`
  131.     rm -rf `cat .fname` .fname
  132.